-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Communication - Refactor Chat Tests to use StepVerifier #16601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/azp run java - communication - ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
LGTM 👍🏻 |
| // Arrange | ||
| CreateChatThreadOptions threadRequest = ChatOptionsProvider.createThreadOptions( | ||
| firstThreadMember.getId(), secondThreadMember.getId()); | ||
| ChatThreadAsyncClient chatThreadClient = client.createChatThread(threadRequest).block(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still need to remove this block. It's what I was asking Srikanta about during the tutorial. Let me find his answer about how to do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"What if we need to set up/create an object on the service first (as part of the arrange), before acting on it? Do we initialize the sync client too, and use it to arrange the setup? Or do we use a multi…"
you can chain multiple service calls asynchronously through Reactor operators like then().. so, the first call will do the necessary setup on the service and then call the next method that you want to test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| // Arrange | ||
| SendChatMessageOptions messageRequest = ChatOptionsProvider.sendMessageOptions(); | ||
|
|
||
| SendChatMessageResult response = chatThreadClient.sendMessage(messageRequest).block(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here, need to get rid of this .block() too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
angiurgiu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Thanks for improving the tests!
No description provided.